package com.magicalcoder.youyamvc.app.logadminoperate.dao.impl;

import com.magicalcoder.youyamvc.app.model.defined.IntegerDate;
import com.magicalcoder.youyamvc.app.model.defined.IntegerObject;
import com.magicalcoder.youyamvc.app.logadminoperate.dao.LogAdminOperateDao;
import com.magicalcoder.youyamvc.app.model.LogAdminOperate;
import com.magicalcoder.youyamvc.app.model.defined.LogAdminOperateWithAdminUser;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
* 代码为自动生成 Created by www.magicalcoder.com
* 如果你改变了此类 read 请将此行删除
* 欢迎加入官方QQ群:323237052
*/

@Component("logAdminOperateDao")
public class LogAdminOperateDaoImpl   implements LogAdminOperateDao {

    @Resource(name="sqlSessionTemplate")
    private  SqlSessionTemplate  sqlSessionTemplate;
    @Override
    public LogAdminOperate getLogAdminOperate(Map<String, Object> query) {
        return sqlSessionTemplate.selectOne("LogAdminOperateMapper.getLogAdminOperate",query);
    }
    @Override
    public List<LogAdminOperate> getLogAdminOperateList(Map<String, Object> query) {
        return sqlSessionTemplate.selectList("LogAdminOperateMapper.getLogAdminOperateList", query);
    }
    @Override
    public Integer getLogAdminOperateListCount(Map<String, Object> query) {
        return sqlSessionTemplate.selectOne("LogAdminOperateMapper.getLogAdminOperateListCount", query);
    }

    @Override
    public void batchInsertLogAdminOperate(List<LogAdminOperate> list) {
        sqlSessionTemplate.insert("LogAdminOperateMapper.batchInsertLogAdminOperate",list);
    }

    @Override
    public void batchReplaceLogAdminOperate(List<LogAdminOperate> list) {
        sqlSessionTemplate.insert("LogAdminOperateMapper.batchReplaceLogAdminOperate",list);
    }

    @Override
    public void batchUpdateLogAdminOperate(List<LogAdminOperate> list) {
        sqlSessionTemplate.update("LogAdminOperateMapper.batchUpdateLogAdminOperate",list);
    }

    @Override
    public     Long  insertLogAdminOperate(LogAdminOperate entity) {
        sqlSessionTemplate.insert("LogAdminOperateMapper.insertLogAdminOperate",entity);
  return entity.getId();    }

    @Override
    public     Long  replaceLogAdminOperate(LogAdminOperate entity) {
        sqlSessionTemplate.insert("LogAdminOperateMapper.replaceLogAdminOperate",entity);
  return entity.getId();    }

    @Override
    public void updateLogAdminOperate(LogAdminOperate entity) {
        sqlSessionTemplate.update("LogAdminOperateMapper.updateLogAdminOperate", entity);
    }
    @Override
    public void updateLogAdminOperateWithoutNull(LogAdminOperate entity) {
        sqlSessionTemplate.update("LogAdminOperateMapper.updateLogAdminOperateWithoutNull", entity);
    }
    @Override
    public void updateLogAdminOperateByWhereSql(Map<String,Object> entity) {
        sqlSessionTemplate.update("LogAdminOperateMapper.updateLogAdminOperateByWhereSql", entity);
    }
    @Override
    public List<LogAdminOperateWithAdminUser> getLogAdminOperateWithAdminUserByAdminUserIdList(Map<String, Object> query){
        return sqlSessionTemplate.selectList("LogAdminOperateMapper.getLogAdminOperateWithAdminUserByAdminUserIdList", query);
    }
    @Override
    public void truncateLogAdminOperate() {
        sqlSessionTemplate.delete("LogAdminOperateMapper.truncateLogAdminOperate");
    }
    @Override
    public void deleteLogAdminOperate(Map<String, Object> query) {
        sqlSessionTemplate.delete("LogAdminOperateMapper.deleteLogAdminOperate",query);
    }
    @Override
    public void deleteLogAdminOperateList(Map<String, Object> query) {
        sqlSessionTemplate.delete("LogAdminOperateMapper.deleteLogAdminOperateList",query);
    }
    @Override
    public void deleteLogAdminOperateByWhereSql(Map<String, Object> query) {
        sqlSessionTemplate.delete("LogAdminOperateMapper.deleteLogAdminOperateByWhereSql",query);
    }
    @Override
    public void batchDeleteLogAdminOperate(List<Long> list) {
        sqlSessionTemplate.delete("LogAdminOperateMapper.batchDeleteLogAdminOperate",list);
    }
    @Override
    public void batchDeleteLogAdminOperateList(List<LogAdminOperate> list) {
        sqlSessionTemplate.delete("LogAdminOperateMapper.batchDeleteLogAdminOperateList",list);
    }

    @Override
    public List<IntegerDate> statisticsDateCountList(Map<String, Object> query) {
    return sqlSessionTemplate.selectList("LogAdminOperateMapper.statisticsDateCountList", query);
    }

    @Override
    public List<IntegerDate> statisticsDateIntervalList(Map<String, Object> query) {
        return sqlSessionTemplate.selectList("LogAdminOperateMapper.statisticsDateIntervalList", query);
    }

    @Override
    public List<IntegerObject> statisticsGroupList(Map<String, Object> query) {
        return sqlSessionTemplate.selectList("LogAdminOperateMapper.statisticsGroupList", query);
    }
}
